<include file="public:top" />
<!--编辑菜单-->
<fieldset class="layui-elem-field layui-field-title">
    <legend>添加新闻</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="" style="padding:20px;">

	<input type="hidden" value="{$menuid}" name="menuid">
	<div class="layui-form-item">
      <label class="layui-form-label">标题</label>
      <div class="layui-input-block">
        <input type="text" name="title" id="J_title" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
    <label class="layui-form-label">所在栏目</label>
    <div class="layui-input-block">
      <select name="cateid">
        <option value="">请选择</option>
		<volist name="catelist" id="val" >
			<option value="{$val.id}" <if condition="$pid eq $val['id']"> selected=""</if>>{$val.name}</option>
				<volist name="val['erji']" id="vo">
					<option value="{$vo.id}" <if condition="$pid eq $vo['id']"> selected=""</if>>&nbsp;&nbsp;&nbsp;├─ {$vo.name}</option>
				</volist>
		</volist>
	   </select>
    </div>
  </div>

   
    <div class="layui-form-item layui-form-text">
      <label class="layui-form-label">描述</label>
      <div class="layui-input-block">
        <textarea name="intro" class="layui-textarea"></textarea>
      </div>
    </div>

    <div class="layui-form-item layui-form-text">
      <label class="layui-form-label">内容</label>
      <div class="layui-input-block">
        <textarea class="layui-textarea" name='content' id="content" ></textarea>
      </div>
    </div>

  <!--   <div class="tpt_item">
	  <input type="hidden" name="tags" value="">
	    <div class="layui-form-item" style="margin-bottom: 10px;">
	      <label class="layui-form-label">标签</label>
	      <div class="layui-input-block">
	        <input id="tpt_input" type="text" name="tags" class="layui-input" placeholder="多个标签,用半角逗号隔开" style="width: 400px;float: left;margin-right: 20px;">
	        <button class="layui-btn" id="tpt_btn" type="button" style="background: #FF5722;margin-bottom: 10px;">获取标签</button>
	      </div>
	  </div>
	  </div> -->

  <div class="layui-form-item">
        <button class="layui-btn" lay-submit="" lay-filter="content_edit">立即提交</button>
        <button class="layui-btn layui-btn-primary" onClick="history.go(-1)">返回</button>
  </div>

</form>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
layui.use(['layer','jquery','form','element','layedit'], function () {

	 //参数：layui、名称、更新的formid、更新的url：module/method、更新后跳转的url（为空则不跳转）、编辑器id、标签id（为空则不获取）
    Oper.initUpdate(layui, '新闻', 'content_edit', 'article/add', 'article/index', ['content'], '#tpt_btn');
});
</script>
</body>
</html>